(function(){
    'use strict';

    var app = angular.module('myApp.login-module');
    
    app.controller( 'LoginController', [ '$rootScope', '$scope', 'Auth', 'Storage', 'Translation',
                                         function( $rootScope, $scope, Auth , Storage, Translation ){
    	
    	$scope.i = 0;
    	$scope.changeLanguage = function(){
    		if( $scope.i % 2 == 0 )
    			Translation.setLanguage( 'en_EN' );
    		else
    			Translation.setLanguage( 'es_ES' );
    		
    		$scope.i += 1;
    	}
    	
    } ] );

})();